<%@ page language="java" import="java.util.*" contentType="text/html; charset=UTF-8" 
    pageEncoding="utf-8"%>

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">


<html xmlns="http://www.w3.org/1999/xhtml">
<head>
	<%@ include file="../header.jsp"%>
	<script type="text/javascript" src="<%=resourceBase%>customJS/common/commonFunc.js"></script>
	<script type="text/javascript" src="<%=resourceBase%>customJS/baseInfo/deviceManagement.js"></script>
  </head>
	<body>
		<div id="body-wrapper">
			<!-- Wrapper for the radial gradient background -->

			<!-- sidebar.jsp -->
			<%@ include file="../sidebar.jsp"%>
			<div id="gridContent">
				<!-- Main Content Section with everything -->

				<!-- Page Head -->
				<h2>
					监测设备
				</h2>
				<p id="page-intro">
					对监测设备的管理
				</p>
				<table id="gridTable"></table>
				<div id="gridPager">

				</div>
				<div>
					<button class="right-button02" onclick="openDialog4Adding()">
						添加
					</button>
					<button class="right-button02" onclick="openDialog4Updating()">
						修改
					</button>
					<button class="right-button02" onclick="openDialog4Deleting()">
						删除
					</button>

				</div>
				<div id="consoleDlg">
					<div id="formContainer">
						<form id="consoleForm">
							<input type="hidden" id="selectId" /><br>
							<table class="formTable">
								<tr>
									<th>
										<span style="color:red">*</span>监测类别：
									</th>
									<td>
										<select class="select" id="monitorType" name="monitorType">
											<option value="no">
												--请选择--
											</option>
										</select>
									</td>
									<th>
										<span style="color:red">*</span>设备类型:
									</th>
									<td>
										<select class="select" id="deviceType" name="deviceType">
											<option value="no">--请选择--</option>
											<option value="设备">设备</option>
											<option value="仪表">仪表</option>
											<option value="系统">系统</option>
										</select>
									</td>
								</tr>
								<tr>
									<th>
										<span style="color:red">*</span>设备名称:
									</th>
									<td>
										<input type="text" class="textField" id="devicename" name="devicename" maxlength="25"/>
									</td>
									<th>
										<span style="color:red">*</span>设备显示名称:
									</th>
									<td>
										<input type="text" class="textField" id="deviceDisplayName" name="deviceDisplayName" maxlength="25"/>
									</td>
								</tr>
								<tr>
									<th>
										<span style="color:red">*</span>设备指令:
									</th>
									<td>
										<input type="text" class="textField" id="instructionCode" name="instructionCode"  maxlength="20"
										onkeyup="value=value.replace(/[\W]/g,'') " 
    									onbeforepaste="clipboardData.setData('text',clipboardData.getData('text').replace(/[^\d]/g,''))"/>
									</td>
									<th>
										<span style="color:red">*</span>设备图像路径:
									</th>
									<td>
										<input type="text" class="textField" id="deviceImageUrl" name="deviceImageUrl" />
									</td>
								</tr>
								<tr>
									<th>
										双字序列：
									</th>
									<td>
										<input type="text" class="textField" id="dWordSeq" name="dWordSeq" maxlength="5" 
										onkeyup="value=value.replace(/[^\d]/g,'')"
										onbeforepaste="clipboardData.setData('text',clipboardData.getData('text').replace(/[^\d]/g,''))"/>
									</td>
									<th>
										状态位序列：
									</th>
									<td>
										<input type="text" class="textField" id="bitSeq" name="bitSeq" maxlength="5" 
										onkeyup="value=value.replace(/[^\d]/g,'')"
										onbeforepaste="clipboardData.setData('text',clipboardData.getData('text').replace(/[^\d]/g,''))"/>
									</td>
								</tr>
								<tr>
									<th>
										状态位值：
									</th>
									<td>
										<input type="text" class="textField" id="statusValue" name="statusValue" maxlength="10"
										onkeyup="if(isNaN(value)||isTriDecimal(value, 1))execCommand('undo')" onafterpaste="if(isNaN(value)||isTriDecimal(value, 1))execCommand('undo')"/>
									</td>
									<th>
										状态位值描述：
									</th>
									<td>
										<input type="text" class="textField" id="statDesc" name="statDesc" maxlength="25"/>
									</td>
								</tr>
								<tr>
									<th>
										可控标志：
									</th>
									<td>
										<input type="checkbox" class="checkbox" id="controllFlag" name="controllFlag" />
									</td>
									<th>
										位值图像描述：
									</th>
									<td>
										<input type="text" class="textField" id="statImageUrl" name="statImageUrl" />
									</td>
								</tr>
								<tr>
									<th>
										警报级别：
									</th>
									<td>
										<select class="select" id="alarmConfig" name="alarmConfig">
											<option value="no">--请选择--</option>
										</select>
									</td>
									<th>
										警报描述：
									</th>
									<td>
										<input type="text" class="textField" id="alarmContent" name="alarmContent" maxlength="50"/>
									</td>
								</tr>
								<tr>
									<th>
										备注：
									</th>
									<td>
										<textarea rows="3" cols="3" class="textArea" id="remark" name="remark" maxlength="100"></textarea>
									</td>
								</tr>
							</table>
						</form>
					</div>
				</div>
			</div>
		</div>
	<script type="text/javascript">$.setCurrentMenu('2_JCSB');</script>
	</body>
</html>
